import os
import sys
name = sys.argv[1]

os.system("relax.mpi.linuxgccrelease -s {name}.pdb -out:pdb -relax:default_repeats 15 -relax:jump_move true -relax:bb_move true -relax:chi_move true -ignore_zero_occupancy false".format(name=name))
os.system("foldx --command=RepairPDB --pdb={}_0001.pdb --pdbHydrogens true".format(name))

os.system("relax.mpi.linuxgccrelease -s {name}_0001_Repair.pdb -out:pdb -relax:default_repeats 15 -relax:jump_move true -relax:bb_move true -relax:chi_move true -ignore_zero_occupancy false".format(name=name))
os.system("foldx --command=RepairPDB --pdb={}_0001_Repair_0001.pdb --pdbHydrogens true".format(name))

os.system("relax.mpi.linuxgccrelease -s {name}_0001_Repair_0001_Repair.pdb -out:pdb -relax:default_repeats 15 -relax:jump_move true -relax:bb_move true -relax:chi_move true -ignore_zero_occupancy false".format(name=name))
os.system("foldx --command=RepairPDB --pdb={}_0001_Repair_0001_Repair_0001.pdb --pdbHydrogens true".format(name))

os.system("relax.mpi.linuxgccrelease -s {name}_0001_Repair_0001_Repair_0001_Repair.pdb -out:pdb -relax:default_repeats 15 -relax:jump_move true -relax:bb_move true -relax:chi_move true -ignore_zero_occupancy false".format(name=name))
os.system("foldx --command=RepairPDB --pdb={}_0001_Repair_0001_Repair_0001_Repair_0001.pdb --pdbHydrogens true".format(name))

os.system("relax.mpi.linuxgccrelease -s {name}_0001_Repair_0001_Repair_0001_Repair_0001_Repair.pdb -out:pdb -relax:default_repeats 15 -relax:jump_move true -relax:bb_move true -relax:chi_move true -ignore_zero_occupancy false".format(name=name))


